package com.zzy.demo.entity;

import java.util.Date;

import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonView;
import com.zzy.demo.validate.MyConstraint;

public class Order {
	
	public interface OrderSimpleView {}

	public interface OrderDetailView extends OrderSimpleView {}
	
	
    @MyConstraint
	private String id;
	
	@NotBlank(message="name不能为空")
	private String name;
	
	@Past
	private Date creatime;
	
	
	@JsonView(OrderDetailView.class)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@JsonView(OrderSimpleView.class)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreatime() {
		return creatime;
	}

	public void setCreatime(Date creatime) {
		this.creatime = creatime;
	}

	

}
